﻿@model Inscriptionem.Models.Blog.Views.Controls.CommentsViewModel

@if (Model.Article.Comments.Any())
{
<text>
<h3 id="comments">Responses to “@Model.Article.Title”: @Model.Article.CommentsCount</h3>

<ol class="commentlist">
    @foreach (var comment in Model.Article.Comments)
    {
    <text>
	<li class="comment even thread-even depth-1" id="comment-@comment.ID">
		<div id="div-comment-@comment.ID" class="comment-body">
			<div class="comment-author vcard">
		        <img alt="" src="/Content/Themes/General/Images/member.png" class="avatar photo" height="32" width="32" style="float: left; margin-right: 10px;">
                <div class="comment-meta commentmetadata">
                    <a href="#comment-@comment.ID">@comment.CreatedDate.ToShortDateString()</a>
                </div>
                <cite class="fn"><a href="/@Model.Language/Member/@comment.Member.ID" class="url">@(comment.Member.MemberSettings.IsRealNameVisible ? (comment.Member.FirstName + " " + comment.Member.NickName + " " + comment.Member.LastName) : comment.Member.NickName)</a></cite>
                <span class="says">says:</span>
                <div class="clear"></div>
            </div>


            @if (!comment.IsPublished)
            {
            <text>
            <p>Waiting for approval...</p>
            </text>
            }
		    <p>@comment.Content</p>
		</div>
	</li>
    </text>
    }
</ol>
</text>
}